# coding: utf-8
from marshmallow import Schema, fields
from model.model_base import Base
from sqlalchemy import Column, String, Integer


class PendingProRep(Base):
    # 待处理问题统计表
    __tablename__ = 'PendingProRep'
    bureauid = Column(String(2), primary_key=True, comment='供电局编号')
    bureauname = Column(String(50), nullable=True, comment='供电局名称')
    stationid = Column(String(2), primary_key=True, comment='供所编号')
    stationname = Column(String(50), nullable=True, comment='供电所名称')
    pending_number = Column(Integer, nullable=True, comment='未处理问题数量')
    flag = Column(String(1), primary_key=True, comment='问题处理方标志（1局方2我方）')


class PendingProRepSchema(Schema):
    bureauid = fields.String()
    bureauname = fields.String()
    stationid = fields.String()
    stationname = fields.String()
    pending_number = fields.Integer()
    flag = fields.String()


pendingProRepSchema = PendingProRepSchema()


